package router

import (
	"ruoyi-go-echo-ddd/internal/infrastructure/http/handler"

	"github.com/labstack/echo/v4"
)

// NewSysRoleRouter 系统角色路由初始化
func NewSysRoleRouter(group *echo.Group, sysRole *handler.SysRoleHandler) {
	sysRoleRouterGroup := group.Group("/system/role")
	sysRoleRouterGroup.POST("", sysRole.SaveHandler)
	sysRoleRouterGroup.PUT("", sysRole.UpdateHandler)
	sysRoleRouterGroup.POST("/batchSave", sysRole.BatchSaveHandler)
	sysRoleRouterGroup.GET("/list", sysRole.SelectPageHandler)
	sysRoleRouterGroup.GET("/:id", sysRole.SelectOneHandler)
	sysRoleRouterGroup.DELETE("/:ids", sysRole.BatchDeleteHandler)
	sysRoleRouterGroup.POST("/list", sysRole.SelectListHandler)
	sysRoleRouterGroup.GET("/list/user", sysRole.SelectIdListHandler)
	sysRoleRouterGroup.GET("/selectAll", sysRole.SelectAllHandler)
	sysRoleRouterGroup.PUT("/dataScope", sysRole.DataScopeHandler)
	sysRoleRouterGroup.GET("/export", sysRole.ExportExcelBufferHandler)
}
